package com.zwj.enums;

public enum SexEnum {
    FEMALE("0","女"),MALE("1","男");
    private String key;
    private String value;
    SexEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }
    public static String getEnumValue(String key) {
        SexEnum[] sexEnums = SexEnum.values();
        for (SexEnum sexEnum : sexEnums) {
            if (sexEnum.getKey().equals(key)) {
                return sexEnum.getValue();
            }
        }
        return null;
    }
    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
